import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class MyRaisedBtn extends StatefulWidget {
  int color;
  final Function onPressed;
  String text;
  int textColor;

  MyRaisedBtn(
      {this.color = 0xffffffff,
      this.text = '',
      this.textColor = 0xff000000,
      this.onPressed});

  @override
  _MyRaisedBtnState createState() => _MyRaisedBtnState();
}

class _MyRaisedBtnState extends State<MyRaisedBtn> {
  @override
  Widget build(BuildContext context) {
    return RaisedButton(
      color: Color(widget.color),
      onPressed: () {
        widget.onPressed();
      },
      child: Text(widget.text,
          style: TextStyle(fontSize: 15.0, color: Color(widget.textColor))),
      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5.0)),
      elevation: 0.0,
      highlightElevation: 0.0,
      disabledElevation: 0.0,
      highlightColor: Colors.transparent,
      splashColor: Colors.transparent,
    );
  }
}
